﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:System="clr-namespace:System;assembly=mscorlib"
    xmlns:localp="clr-namespace:UTable.Objects.Controls.Primitives"
    xmlns:local="clr-namespace:UTable.Objects.Controls">
    <Style TargetType="{x:Type local:UScrollViewer}">
        <!--Setter Property="Elasticity" Value="0.4,0.4"/-->
        <Setter Property="HorizontalScrollBarVisibility" Value="Auto"/>
        <Setter Property="VerticalScrollBarVisibility" Value="Auto"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type local:UScrollViewer}">
                    <local:UGrid HorizontalAlignment="Stretch" Margin="{TemplateBinding Padding}" VerticalAlignment="Stretch" OpacityMask="{x:Null}" Background="{TemplateBinding Background}">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*"/>
                            <ColumnDefinition Width="Auto"/>
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="*"/>
                            <RowDefinition Height="Auto"/>
                        </Grid.RowDefinitions>
                        <local:UBorder x:Name="PART_ElasticBorder" Background="{TemplateBinding Background}" Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="0" Grid.RowSpan="2" >
                            <ScrollContentPresenter x:Name="SCPresenter" Margin="-1" OpacityMask="{x:Null}" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" 
                                                    Grid.Column="0" Grid.ColumnSpan="1" Grid.Row="0" Grid.RowSpan="1" 
                                                    ScrollViewer.HorizontalScrollBarVisibility="Disabled" 
                                                    CanContentScroll="{TemplateBinding CanContentScroll}" 
                                                    CanHorizontallyScroll="False" CanVerticallyScroll="False"/>
                        </local:UBorder>
                        <localp:UScrollBar x:Name="PART_HorizontalScrollBar" HorizontalAlignment="Stretch" Opacity="0" IsHitTestVisible="False"
                                           MinHeight="30" MinWidth="30" Height="NaN" Foreground="{x:Null}" HorizontalContentAlignment="Stretch" 
                                           VerticalContentAlignment="Stretch" Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}" 
                                           Grid.Column="0" Grid.Row="1" LargeChange="1" Maximum="{TemplateBinding ScrollableWidth}" Minimum="0" 
                                           Value="{Binding HorizontalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" 
                                           ScrollViewer.HorizontalScrollBarVisibility="Disabled" Orientation="Horizontal" 
                                           ViewportSize="{TemplateBinding ViewportWidth}" AutomationProperties.AutomationId="HorizontalScrollBar">
                            <localp:UScrollBar.Style>
                                <Style TargetType="{x:Type localp:UScrollBar}">
                                    <Style.Resources>
                                        <System:Double x:Key="{x:Static SystemParameters.HorizontalScrollBarButtonWidthKey}">52</System:Double>
                                        <System:Double x:Key="{x:Static SystemParameters.VerticalScrollBarButtonHeightKey}">52</System:Double>
                                    </Style.Resources>
                                    <Setter Property="Stylus.IsPressAndHoldEnabled" Value="False"/>
                                    <Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
                                    <Setter Property="BorderBrush" Value="#33000000"/>
                                    <Setter Property="Background">
                                        <Setter.Value>
                                            <LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5">
                                                <GradientStop Color="#33364E5C" Offset="0"/>
                                                <GradientStop Color="#0C364E5C" Offset="1"/>
                                            </LinearGradientBrush>
                                        </Setter.Value>
                                    </Setter>
                                    <Setter Property="Width" Value="30"/>
                                    <Setter Property="MinWidth" Value="30"/>
                                    <Setter Property="Height" Value="NaN"/>
                                    <Setter Property="MinHeight" Value="30"/>
                                    <Setter Property="VerticalAlignment" Value="Stretch"/>
                                    <Setter Property="HorizontalAlignment" Value="Stretch"/>
                                    <Setter Property="Template">
                                        <Setter.Value>
                                            <ControlTemplate TargetType="{x:Type localp:UScrollBar}">
                                                <ControlTemplate.Resources>
                                                    <Storyboard x:Key="Touch">
                                                        <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="Width" To="30"/>
                                                        <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="Thumb" Storyboard.TargetProperty="MinHeight" To="12"/>
                                                        <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="Thumb" Storyboard.TargetProperty="MinWidth" To="30"/>
                                                    </Storyboard>
                                                    <Storyboard x:Key="Release">
                                                        <DoubleAnimation Duration="00:00:00.2000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="Width"/>
                                                        <DoubleAnimation Duration="00:00:00.2000000" Storyboard.TargetName="Thumb" Storyboard.TargetProperty="MinHeight"/>
                                                        <DoubleAnimation Duration="00:00:00.2000000" Storyboard.TargetName="Thumb" Storyboard.TargetProperty="MinWidth"/>
                                                    </Storyboard>
                                                </ControlTemplate.Resources>
                                                <Grid x:Name="GridRoot" HorizontalAlignment="Stretch" MinHeight="30" MinWidth="30" Width="Auto" SnapsToDevicePixels="True" Background="Transparent">
                                                    <Rectangle x:Name="TrackBkgd" Fill="{TemplateBinding Background}" Stroke="{TemplateBinding BorderBrush}" RadiusX="4" RadiusY="4" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Width="8" Height="Auto"/>
                                                    <Border x:Name="Track" HorizontalAlignment="Stretch" Opacity="1" SnapsToDevicePixels="True" Background="Transparent">
                                                        <localp:UTrack x:Name="PART_Track" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" IsDirectionReversed="True">
                                                            <localp:UTrack.Thumb>
                                                                <localp:UThumb x:Name="Thumb" MinHeight="8" MinWidth="8" Background="White" SnapsToDevicePixels="True">
                                                                    <localp:UThumb.BorderBrush>
                                                                        <LinearGradientBrush EndPoint="0.5,-0.012" StartPoint="0.5,1.002">
                                                                            <GradientStop Color="#66000000" Offset="0"/>
                                                                            <GradientStop Color="#33000000" Offset="1"/>
                                                                        </LinearGradientBrush>
                                                                    </localp:UThumb.BorderBrush>
                                                                    <localp:UThumb.Style>
                                                                        <Style TargetType="{x:Type localp:UThumb}">
                                                                            <Setter Property="Background">
                                                                                <Setter.Value>
                                                                                    <LinearGradientBrush EndPoint="0.5,-0.012" StartPoint="0.5,1.002">
                                                                                        <GradientStop Color="#66000000" Offset="0"/>
                                                                                        <GradientStop Color="#33000000" Offset="1"/>
                                                                                    </LinearGradientBrush>
                                                                                </Setter.Value>
                                                                            </Setter>
                                                                            <Setter Property="BorderBrush">
                                                                                <Setter.Value>
                                                                                    <LinearGradientBrush EndPoint="1.083,0.495" StartPoint="0.042,0.495">
                                                                                        <GradientStop Color="#7FFFFFFF" Offset="0"/>
                                                                                        <GradientStop Color="#19000000" Offset="1"/>
                                                                                    </LinearGradientBrush>
                                                                                </Setter.Value>
                                                                            </Setter>
                                                                            <Setter Property="Template">
                                                                                <Setter.Value>
                                                                                    <ControlTemplate TargetType="{x:Type localp:UThumb}">
                                                                                        <ControlTemplate.Resources>
                                                                                            <Storyboard x:Key="Press">
                                                                                                <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="Glow" Storyboard.TargetProperty="Opacity" To="1"/>
                                                                                                <ThicknessAnimation Duration="00:00:00.1000000" Storyboard.TargetName="Glow" Storyboard.TargetProperty="Margin" To="-3"/>
                                                                                            </Storyboard>
                                                                                            <Storyboard x:Key="Release">
                                                                                                <DoubleAnimation Duration="00:00:00.1500000" Storyboard.TargetName="Glow" Storyboard.TargetProperty="Opacity" From="1" To="0"/>
                                                                                                <ThicknessAnimation Duration="00:00:00.1500000" Storyboard.TargetName="Glow" Storyboard.TargetProperty="Margin" From="-3" To="-1"/>
                                                                                            </Storyboard>
                                                                                        </ControlTemplate.Resources>
                                                                                        <Grid x:Name="Grid" Width="{TemplateBinding MinWidth}" Height="Auto" SnapsToDevicePixels="True" Background="Transparent">
                                                                                            <Rectangle x:Name="Base" Fill="{TemplateBinding Background}" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="1" RadiusX="3" RadiusY="3" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Height="Auto" SnapsToDevicePixels="True"/>
                                                                                            <Rectangle x:Name="RenderOverlay" RadiusX="3" RadiusY="3" HorizontalAlignment="Stretch" Margin="1" VerticalAlignment="Stretch" Height="Auto" SnapsToDevicePixels="True">
                                                                                                <Rectangle.Stroke>
                                                                                                    <LinearGradientBrush EndPoint="1.083,0.495" StartPoint="0.042,0.495">
                                                                                                        <GradientStop Color="#7FFFFFFF" Offset="0"/>
                                                                                                        <GradientStop Color="#19000000" Offset="1"/>
                                                                                                    </LinearGradientBrush>
                                                                                                </Rectangle.Stroke>
                                                                                                <Rectangle.Fill>
                                                                                                    <LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5">
                                                                                                        <GradientStop Color="#4CFFFFFF" Offset="0"/>
                                                                                                        <GradientStop Color="#0C000000" Offset="1"/>
                                                                                                    </LinearGradientBrush>
                                                                                                </Rectangle.Fill>
                                                                                            </Rectangle>
                                                                                            <Rectangle x:Name="Glow" Opacity="0" RadiusX="3" RadiusY="3" Margin="3">
                                                                                                <Rectangle.Fill>
                                                                                                    <SolidColorBrush Color="White"/>
                                                                                                </Rectangle.Fill>
                                                                                                    <!--Rectangle.BitmapEffect>
                                                                                                        <OuterGlowBitmapEffect GlowColor="White" GlowSize="8"/>
                                                                                                    </Rectangle.BitmapEffect-->
                                                                                            </Rectangle>
                                                                                        </Grid>
                                                                                        <ControlTemplate.Triggers>
                                                                                            <Trigger Property="IsFocused" Value="True"/>
                                                                                            <Trigger Property="IsDragging" Value="True">
                                                                                                <Trigger.EnterActions>
                                                                                                    <BeginStoryboard>
                                                                                                        <Storyboard>
                                                                                                            <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="Glow" Storyboard.TargetProperty="Opacity" To="1"/>
                                                                                                            <ThicknessAnimation Duration="00:00:00.1000000" Storyboard.TargetName="Glow" Storyboard.TargetProperty="Margin" To="-3"/>
                                                                                                        </Storyboard>
                                                                                                    </BeginStoryboard>
                                                                                                </Trigger.EnterActions>
                                                                                                <Trigger.ExitActions>
                                                                                                    <BeginStoryboard>
                                                                                                        <Storyboard>
                                                                                                            <DoubleAnimation Duration="00:00:00.1500000" Storyboard.TargetName="Glow" Storyboard.TargetProperty="Opacity" From="1" To="0"/>
                                                                                                            <ThicknessAnimation Duration="00:00:00.1500000" Storyboard.TargetName="Glow" Storyboard.TargetProperty="Margin" From="-3" To="-1"/>
                                                                                                        </Storyboard>
                                                                                                    </BeginStoryboard>
                                                                                                </Trigger.ExitActions>
                                                                                            </Trigger>
                                                                                            <Trigger Property="IsEnabled" Value="False">
                                                                                                <Setter Property="Fill" TargetName="RenderOverlay" Value="#1C000000"/>
                                                                                            </Trigger>
                                                                                        </ControlTemplate.Triggers>
                                                                                    </ControlTemplate>
                                                                                </Setter.Value>
                                                                            </Setter>
                                                                        </Style>
                                                                    </localp:UThumb.Style>
                                                                </localp:UThumb>
                                                            </localp:UTrack.Thumb>
                                                            <localp:UTrack.IncreaseRepeatButton>
                                                                <localp:URepeatButton Background="Transparent" SnapsToDevicePixels="True" Command="ScrollBar.LineDownCommand" x:Name="SliderIncrease">
                                                                    <localp:URepeatButton.Style>
                                                                        <Style TargetType="{x:Type localp:URepeatButton}">
                                                                            <Setter Property="Background" Value="{x:Null}"/>
                                                                            <Setter Property="BorderBrush" Value="{x:Null}"/>
                                                                            <Setter Property="IsTabStop" Value="False"/>
                                                                            <Setter Property="Focusable" Value="False"/>
                                                                            <Setter Property="Interval" Value="80"/>
                                                                            <Setter Property="Padding" Value="-5"/>
                                                                            <Setter Property="Template">
                                                                                <Setter.Value>
                                                                                    <ControlTemplate TargetType="{x:Type localp:URepeatButton}">
                                                                                        <Grid>
                                                                                            <Rectangle Fill="{TemplateBinding Background}" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="1" Margin="{TemplateBinding Padding}"/>
                                                                                        </Grid>
                                                                                    </ControlTemplate>
                                                                                </Setter.Value>
                                                                            </Setter>
                                                                        </Style>
                                                                    </localp:URepeatButton.Style>
                                                                </localp:URepeatButton>
                                                            </localp:UTrack.IncreaseRepeatButton>
                                                            <localp:UTrack.DecreaseRepeatButton>
                                                                <localp:URepeatButton Background="Transparent" SnapsToDevicePixels="True" Command="ScrollBar.LineUpCommand" x:Name="SliderDecrease">
                                                                    <localp:URepeatButton.Style>
                                                                        <Style TargetType="{x:Type localp:URepeatButton}">
                                                                            <Setter Property="Background" Value="{x:Null}"/>
                                                                            <Setter Property="BorderBrush" Value="{x:Null}"/>
                                                                            <Setter Property="IsTabStop" Value="False"/>
                                                                            <Setter Property="Focusable" Value="False"/>
                                                                            <Setter Property="Interval" Value="80"/>
                                                                            <Setter Property="Padding" Value="-5"/>
                                                                            <Setter Property="Template">
                                                                                <Setter.Value>
                                                                                    <ControlTemplate TargetType="{x:Type localp:URepeatButton}">
                                                                                        <Grid>
                                                                                            <Rectangle Fill="{TemplateBinding Background}" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="1" Margin="{TemplateBinding Padding}"/>
                                                                                        </Grid>
                                                                                    </ControlTemplate>
                                                                                </Setter.Value>
                                                                            </Setter>
                                                                        </Style>
                                                                    </localp:URepeatButton.Style>
                                                                </localp:URepeatButton>
                                                            </localp:UTrack.DecreaseRepeatButton>
                                                        </localp:UTrack>
                                                    </Border>
                                                </Grid>
                                                <ControlTemplate.Triggers>
                                                    <Trigger Property="IsAnyContactCapturedWithin" Value="True">
                                                        <Trigger.EnterActions>
                                                            <BeginStoryboard>
                                                                <Storyboard>
                                                                    <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="Width" To="30"/>
                                                                    <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="Thumb" Storyboard.TargetProperty="MinHeight" To="12"/>
                                                                    <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="Thumb" Storyboard.TargetProperty="MinWidth" To="30"/>
                                                                </Storyboard>
                                                            </BeginStoryboard>
                                                        </Trigger.EnterActions>
                                                        <Trigger.ExitActions>
                                                            <BeginStoryboard>
                                                                <Storyboard>
                                                                    <DoubleAnimation Duration="00:00:00.2000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="Width"/>
                                                                    <DoubleAnimation Duration="00:00:00.2000000" Storyboard.TargetName="Thumb" Storyboard.TargetProperty="MinHeight"/>
                                                                    <DoubleAnimation Duration="00:00:00.2000000" Storyboard.TargetName="Thumb" Storyboard.TargetProperty="MinWidth"/>
                                                                </Storyboard>
                                                            </BeginStoryboard>
                                                        </Trigger.ExitActions>
                                                    </Trigger>
                                                    <Trigger Property="IsEnabled" Value="False">
                                                        <Setter Property="Background" TargetName="Thumb" Value="#0CFFFFFF"/>
                                                        <Setter Property="Fill" TargetName="TrackBkgd" Value="#00000000"/>
                                                        <Setter Property="Opacity" TargetName="GridRoot" Value="0.5"/>
                                                        <Setter Property="IsEnabled" TargetName="PART_Track" Value="False"/>
                                                    </Trigger>
                                                </ControlTemplate.Triggers>
                                            </ControlTemplate>
                                        </Setter.Value>
                                    </Setter>
                                    <Style.Triggers>
                                        <Trigger Property="Orientation" Value="Horizontal">
                                            <Setter Property="Width" Value="NaN"/>
                                            <Setter Property="MinWidth" Value="30"/>
                                            <Setter Property="Height" Value="30"/>
                                            <Setter Property="MinHeight" Value="30"/>
                                            <Setter Property="Background">
                                                <Setter.Value>
                                                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                        <GradientStop Color="#33364E5C" Offset="0"/>
                                                        <GradientStop Color="#0C364E5C" Offset="1"/>
                                                    </LinearGradientBrush>
                                                </Setter.Value>
                                            </Setter>
                                            <Setter Property="VerticalAlignment" Value="Stretch"/>
                                            <Setter Property="HorizontalAlignment" Value="Stretch"/>
                                            <Setter Property="Template">
                                                <Setter.Value>
                                                    <ControlTemplate TargetType="{x:Type localp:UScrollBar}">
                                                        <ControlTemplate.Resources>
                                                            <Storyboard x:Key="Touch">
                                                                <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="Height" To="30"/>
                                                                <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="Thumb" Storyboard.TargetProperty="MinHeight" To="30"/>
                                                                <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="Thumb" Storyboard.TargetProperty="MinWidth" To="12"/>
                                                            </Storyboard>
                                                            <Storyboard x:Key="Release">
                                                                <DoubleAnimation Duration="00:00:00.2000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="Height"/>
                                                                <DoubleAnimation Duration="00:00:00.2000000" Storyboard.TargetName="Thumb" Storyboard.TargetProperty="MinHeight"/>
                                                                <DoubleAnimation Duration="00:00:00.2000000" Storyboard.TargetName="Thumb" Storyboard.TargetProperty="MinWidth"/>
                                                            </Storyboard>
                                                        </ControlTemplate.Resources>
                                                        <Grid x:Name="GridRoot" MinHeight="30" MinWidth="30" Height="Auto" SnapsToDevicePixels="True" Background="Transparent">
                                                            <Rectangle x:Name="TrackBkgd" Fill="{TemplateBinding Background}" Stroke="{TemplateBinding BorderBrush}" RadiusX="4" RadiusY="4" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Width="Auto" Height="8"/>
                                                            <Border x:Name="Track" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Opacity="1" SnapsToDevicePixels="True" Background="Transparent">
                                                                <localp:UTrack x:Name="PART_Track" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
                                                                    <localp:UTrack.Thumb>
                                                                        <localp:UThumb x:Name="Thumb" MinHeight="8" MinWidth="8" Background="White" SnapsToDevicePixels="True">
                                                                            <localp:UThumb.BorderBrush>
                                                                                <LinearGradientBrush EndPoint="1.007,0.495" StartPoint="-0.007,0.495">
                                                                                    <GradientStop Color="#66000000" Offset="0"/>
                                                                                    <GradientStop Color="#33000000" Offset="1"/>
                                                                                </LinearGradientBrush>
                                                                            </localp:UThumb.BorderBrush>
                                                                            <localp:UThumb.Style>
                                                                                <Style TargetType="{x:Type localp:UThumb}">
                                                                                    <Setter Property="Background">
                                                                                        <Setter.Value>
                                                                                            <LinearGradientBrush EndPoint="0.5,-0.012" StartPoint="0.5,1.002">
                                                                                                <GradientStop Color="#66000000" Offset="0"/>
                                                                                                <GradientStop Color="#33000000" Offset="1"/>
                                                                                            </LinearGradientBrush>
                                                                                        </Setter.Value>
                                                                                    </Setter>
                                                                                    <Setter Property="BorderBrush">
                                                                                        <Setter.Value>
                                                                                            <LinearGradientBrush EndPoint="1.083,0.495" StartPoint="0.042,0.495">
                                                                                                <GradientStop Color="#7FFFFFFF" Offset="0"/>
                                                                                                <GradientStop Color="#19000000" Offset="1"/>
                                                                                            </LinearGradientBrush>
                                                                                        </Setter.Value>
                                                                                    </Setter>
                                                                                    <Setter Property="Template">
                                                                                        <Setter.Value>
                                                                                            <ControlTemplate TargetType="{x:Type localp:UThumb}">
                                                                                                <ControlTemplate.Resources>
                                                                                                    <Storyboard x:Key="Press">
                                                                                                        <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="Glow" Storyboard.TargetProperty="Opacity" To="1"/>
                                                                                                        <ThicknessAnimation Duration="00:00:00.1000000" Storyboard.TargetName="Glow" Storyboard.TargetProperty="Margin" To="-3"/>
                                                                                                    </Storyboard>
                                                                                                    <Storyboard x:Key="Release">
                                                                                                        <DoubleAnimation Duration="00:00:00.1500000" Storyboard.TargetName="Glow" Storyboard.TargetProperty="Opacity" From="1" To="0"/>
                                                                                                        <ThicknessAnimation Duration="00:00:00.1500000" Storyboard.TargetName="Glow" Storyboard.TargetProperty="Margin" From="-3" To="-1"/>
                                                                                                    </Storyboard>
                                                                                                </ControlTemplate.Resources>
                                                                                                <Grid x:Name="Grid" Width="Auto" Height="{TemplateBinding MinHeight}" SnapsToDevicePixels="True" Background="Transparent">
                                                                                                    <Rectangle x:Name="Base" Fill="{TemplateBinding Background}" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="1" RadiusX="3" RadiusY="3" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Width="Auto" SnapsToDevicePixels="True"/>
                                                                                                    <Rectangle x:Name="RenderOverlay" RadiusX="3" RadiusY="3" HorizontalAlignment="Stretch" Margin="1" VerticalAlignment="Stretch" Width="Auto" SnapsToDevicePixels="True">
                                                                                                        <Rectangle.Stroke>
                                                                                                            <LinearGradientBrush EndPoint="0.563,1.015" StartPoint="0.563,-0.026">
                                                                                                                <GradientStop Color="#7FFFFFFF" Offset="0"/>
                                                                                                                <GradientStop Color="#19000000" Offset="1"/>
                                                                                                            </LinearGradientBrush>
                                                                                                        </Rectangle.Stroke>
                                                                                                        <Rectangle.Fill>
                                                                                                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                                                                                <GradientStop Color="#4CFFFFFF" Offset="0"/>
                                                                                                                <GradientStop Color="#0C000000" Offset="1"/>
                                                                                                            </LinearGradientBrush>
                                                                                                        </Rectangle.Fill>
                                                                                                    </Rectangle>
                                                                                                    <Rectangle x:Name="Glow" Opacity="0" RadiusX="3" RadiusY="3" Margin="3">
                                                                                                        <Rectangle.Fill>
                                                                                                            <SolidColorBrush Color="White"/>
                                                                                                        </Rectangle.Fill>
                                                                                                            <!--Rectangle.BitmapEffect>
                                                                                                                <OuterGlowBitmapEffect GlowColor="White" GlowSize="8"/>
                                                                                                            </Rectangle.BitmapEffect-->
                                                                                                    </Rectangle>
                                                                                                </Grid>
                                                                                                <ControlTemplate.Triggers>
                                                                                                    <Trigger Property="IsFocused" Value="True"/>
                                                                                                    <Trigger Property="IsDragging" Value="True">
                                                                                                        <Trigger.EnterActions>
                                                                                                            <BeginStoryboard>
                                                                                                                <Storyboard>
                                                                                                                    <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="Glow" Storyboard.TargetProperty="Opacity" To="1"/>
                                                                                                                    <ThicknessAnimation Duration="00:00:00.1000000" Storyboard.TargetName="Glow" Storyboard.TargetProperty="Margin" To="-3"/>
                                                                                                                </Storyboard>
                                                                                                            </BeginStoryboard>
                                                                                                        </Trigger.EnterActions>
                                                                                                        <Trigger.ExitActions>
                                                                                                            <BeginStoryboard>
                                                                                                                <Storyboard>
                                                                                                                    <DoubleAnimation Duration="00:00:00.1500000" Storyboard.TargetName="Glow" Storyboard.TargetProperty="Opacity" From="1" To="0"/>
                                                                                                                    <ThicknessAnimation Duration="00:00:00.1500000" Storyboard.TargetName="Glow" Storyboard.TargetProperty="Margin" From="-3" To="-1"/>
                                                                                                                </Storyboard>
                                                                                                            </BeginStoryboard>
                                                                                                        </Trigger.ExitActions>
                                                                                                    </Trigger>
                                                                                                    <Trigger Property="IsEnabled" Value="False">
                                                                                                        <Setter Property="Fill" TargetName="RenderOverlay" Value="#1C000000"/>
                                                                                                    </Trigger>
                                                                                                </ControlTemplate.Triggers>
                                                                                            </ControlTemplate>
                                                                                        </Setter.Value>
                                                                                    </Setter>
                                                                                </Style>
                                                                            </localp:UThumb.Style>
                                                                        </localp:UThumb>
                                                                    </localp:UTrack.Thumb>
                                                                    <localp:UTrack.IncreaseRepeatButton>
                                                                        <localp:URepeatButton Background="Transparent" SnapsToDevicePixels="True" Command="ScrollBar.LineRightCommand" x:Name="SliderIncrease">
                                                                            <localp:URepeatButton.Style>
                                                                                <Style TargetType="{x:Type localp:URepeatButton}">
                                                                                    <Setter Property="Background" Value="{x:Null}"/>
                                                                                    <Setter Property="BorderBrush" Value="{x:Null}"/>
                                                                                    <Setter Property="IsTabStop" Value="False"/>
                                                                                    <Setter Property="Focusable" Value="False"/>
                                                                                    <Setter Property="Interval" Value="80"/>
                                                                                    <Setter Property="Padding" Value="-5"/>
                                                                                    <Setter Property="Template">
                                                                                        <Setter.Value>
                                                                                            <ControlTemplate TargetType="{x:Type localp:URepeatButton}">
                                                                                                <Grid>
                                                                                                    <Rectangle Fill="{TemplateBinding Background}" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="1" Margin="{TemplateBinding Padding}"/>
                                                                                                </Grid>
                                                                                            </ControlTemplate>
                                                                                        </Setter.Value>
                                                                                    </Setter>
                                                                                </Style>
                                                                            </localp:URepeatButton.Style>
                                                                        </localp:URepeatButton>
                                                                    </localp:UTrack.IncreaseRepeatButton>
                                                                    <localp:UTrack.DecreaseRepeatButton>
                                                                        <localp:URepeatButton Background="Transparent" SnapsToDevicePixels="True" Command="ScrollBar.LineLeftCommand" x:Name="SliderDecrease">
                                                                            <localp:URepeatButton.Style>
                                                                                <Style TargetType="{x:Type localp:URepeatButton}">
                                                                                    <Setter Property="Background" Value="{x:Null}"/>
                                                                                    <Setter Property="BorderBrush" Value="{x:Null}"/>
                                                                                    <Setter Property="IsTabStop" Value="False"/>
                                                                                    <Setter Property="Focusable" Value="False"/>
                                                                                    <Setter Property="Interval" Value="80"/>
                                                                                    <Setter Property="Padding" Value="-5"/>
                                                                                    <Setter Property="Template">
                                                                                        <Setter.Value>
                                                                                            <ControlTemplate TargetType="{x:Type localp:URepeatButton}">
                                                                                                <Grid>
                                                                                                    <Rectangle Fill="{TemplateBinding Background}" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="1" Margin="{TemplateBinding Padding}"/>
                                                                                                </Grid>
                                                                                            </ControlTemplate>
                                                                                        </Setter.Value>
                                                                                    </Setter>
                                                                                </Style>
                                                                            </localp:URepeatButton.Style>
                                                                        </localp:URepeatButton>
                                                                    </localp:UTrack.DecreaseRepeatButton>
                                                                </localp:UTrack>
                                                            </Border>
                                                        </Grid>
                                                        <ControlTemplate.Triggers>
                                                            <Trigger Property="IsAnyContactCapturedWithin" Value="True">
                                                                <Trigger.EnterActions>
                                                                    <BeginStoryboard>
                                                                        <Storyboard>
                                                                            <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="Height" To="30"/>
                                                                            <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="Thumb" Storyboard.TargetProperty="MinHeight" To="30"/>
                                                                            <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="Thumb" Storyboard.TargetProperty="MinWidth" To="12"/>
                                                                        </Storyboard>
                                                                    </BeginStoryboard>
                                                                </Trigger.EnterActions>
                                                                <Trigger.ExitActions>
                                                                    <BeginStoryboard>
                                                                        <Storyboard>
                                                                            <DoubleAnimation Duration="00:00:00.2000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="Height"/>
                                                                            <DoubleAnimation Duration="00:00:00.2000000" Storyboard.TargetName="Thumb" Storyboard.TargetProperty="MinHeight"/>
                                                                            <DoubleAnimation Duration="00:00:00.2000000" Storyboard.TargetName="Thumb" Storyboard.TargetProperty="MinWidth"/>
                                                                        </Storyboard>
                                                                    </BeginStoryboard>
                                                                </Trigger.ExitActions>
                                                            </Trigger>
                                                            <Trigger Property="IsEnabled" Value="False">
                                                                <Setter Property="Background" TargetName="Thumb" Value="#0CFFFFFF"/>
                                                                <Setter Property="Fill" TargetName="TrackBkgd" Value="#00000000"/>
                                                                <Setter Property="Opacity" TargetName="GridRoot" Value="0.5"/>
                                                                <Setter Property="IsEnabled" TargetName="PART_Track" Value="False"/>
                                                            </Trigger>
                                                        </ControlTemplate.Triggers>
                                                    </ControlTemplate>
                                                </Setter.Value>
                                            </Setter>
                                        </Trigger>
                                    </Style.Triggers>
                                </Style>
                            </localp:UScrollBar.Style>
                        </localp:UScrollBar>
                        <localp:UScrollBar x:Name="PART_VerticalScrollBar" Opacity="0" IsHitTestVisible="False"
                                           HorizontalAlignment="Stretch" MinHeight="30" MinWidth="30" Width="NaN" 
                                           Foreground="{x:Null}" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" IsEnabled="True" 
                                           Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}" Grid.Column="1" Grid.Row="0" 
                                           LargeChange="1" Maximum="{TemplateBinding ScrollableHeight}" Minimum="0" 
                                           Value="{Binding VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" 
                                           ScrollViewer.HorizontalScrollBarVisibility="Disabled" Orientation="Vertical" 
                                           ViewportSize="{TemplateBinding ViewportHeight}" AutomationProperties.AutomationId="VerticalScrollBar">
                            <localp:UScrollBar.Style>
                                <Style TargetType="{x:Type localp:UScrollBar}">
                                    <Style.Resources>
                                        <System:Double x:Key="{x:Static SystemParameters.HorizontalScrollBarButtonWidthKey}">52</System:Double>
                                        <System:Double x:Key="{x:Static SystemParameters.VerticalScrollBarButtonHeightKey}">52</System:Double>
                                    </Style.Resources>
                                    <Setter Property="Stylus.IsPressAndHoldEnabled" Value="False"/>
                                    <Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
                                    <Setter Property="BorderBrush" Value="#33000000"/>
                                    <Setter Property="Background">
                                        <Setter.Value>
                                            <LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5">
                                                <GradientStop Color="#33364E5C" Offset="0"/>
                                                <GradientStop Color="#0C364E5C" Offset="1"/>
                                            </LinearGradientBrush>
                                        </Setter.Value>
                                    </Setter>
                                    <Setter Property="Width" Value="30"/>
                                    <Setter Property="MinWidth" Value="30"/>
                                    <Setter Property="Height" Value="NaN"/>
                                    <Setter Property="MinHeight" Value="30"/>
                                    <Setter Property="VerticalAlignment" Value="Stretch"/>
                                    <Setter Property="HorizontalAlignment" Value="Stretch"/>
                                    <Setter Property="Template">
                                        <Setter.Value>
                                            <ControlTemplate TargetType="{x:Type localp:UScrollBar}">
                                                <ControlTemplate.Resources>
                                                    <Storyboard x:Key="Touch">
                                                        <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="Width" To="30"/>
                                                        <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="Thumb" Storyboard.TargetProperty="MinHeight" To="12"/>
                                                        <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="Thumb" Storyboard.TargetProperty="MinWidth" To="30"/>
                                                    </Storyboard>
                                                    <Storyboard x:Key="Release">
                                                        <DoubleAnimation Duration="00:00:00.2000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="Width"/>
                                                        <DoubleAnimation Duration="00:00:00.2000000" Storyboard.TargetName="Thumb" Storyboard.TargetProperty="MinHeight"/>
                                                        <DoubleAnimation Duration="00:00:00.2000000" Storyboard.TargetName="Thumb" Storyboard.TargetProperty="MinWidth"/>
                                                    </Storyboard>
                                                </ControlTemplate.Resources>
                                                <Grid x:Name="GridRoot" HorizontalAlignment="Stretch" MinHeight="30" MinWidth="30" Width="Auto" SnapsToDevicePixels="True" Background="Transparent">
                                                    <Rectangle x:Name="TrackBkgd" Fill="{TemplateBinding Background}" Stroke="{TemplateBinding BorderBrush}" RadiusX="4" RadiusY="4" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Width="8" Height="Auto"/>
                                                    <Border x:Name="Track" HorizontalAlignment="Stretch" Opacity="1" SnapsToDevicePixels="True" Background="Transparent">
                                                        <localp:UTrack x:Name="PART_Track" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" IsDirectionReversed="True">
                                                            <localp:UTrack.Thumb>
                                                                <localp:UThumb x:Name="Thumb" MinHeight="8" MinWidth="8" Background="White" SnapsToDevicePixels="True">
                                                                    <localp:UThumb.BorderBrush>
                                                                        <LinearGradientBrush EndPoint="0.5,-0.012" StartPoint="0.5,1.002">
                                                                            <GradientStop Color="#66000000" Offset="0"/>
                                                                            <GradientStop Color="#33000000" Offset="1"/>
                                                                        </LinearGradientBrush>
                                                                    </localp:UThumb.BorderBrush>
                                                                    <localp:UThumb.Style>
                                                                        <Style TargetType="{x:Type localp:UThumb}">
                                                                            <Setter Property="Background">
                                                                                <Setter.Value>
                                                                                    <LinearGradientBrush EndPoint="0.5,-0.012" StartPoint="0.5,1.002">
                                                                                        <GradientStop Color="#66000000" Offset="0"/>
                                                                                        <GradientStop Color="#33000000" Offset="1"/>
                                                                                    </LinearGradientBrush>
                                                                                </Setter.Value>
                                                                            </Setter>
                                                                            <Setter Property="BorderBrush">
                                                                                <Setter.Value>
                                                                                    <LinearGradientBrush EndPoint="1.083,0.495" StartPoint="0.042,0.495">
                                                                                        <GradientStop Color="#7FFFFFFF" Offset="0"/>
                                                                                        <GradientStop Color="#19000000" Offset="1"/>
                                                                                    </LinearGradientBrush>
                                                                                </Setter.Value>
                                                                            </Setter>
                                                                            <Setter Property="Template">
                                                                                <Setter.Value>
                                                                                    <ControlTemplate TargetType="{x:Type localp:UThumb}">
                                                                                        <ControlTemplate.Resources>
                                                                                            <Storyboard x:Key="Press">
                                                                                                <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="Glow" Storyboard.TargetProperty="Opacity" To="1"/>
                                                                                                <ThicknessAnimation Duration="00:00:00.1000000" Storyboard.TargetName="Glow" Storyboard.TargetProperty="Margin" To="-3"/>
                                                                                            </Storyboard>
                                                                                            <Storyboard x:Key="Release">
                                                                                                <DoubleAnimation Duration="00:00:00.1500000" Storyboard.TargetName="Glow" Storyboard.TargetProperty="Opacity" From="1" To="0"/>
                                                                                                <ThicknessAnimation Duration="00:00:00.1500000" Storyboard.TargetName="Glow" Storyboard.TargetProperty="Margin" From="-3" To="-1"/>
                                                                                            </Storyboard>
                                                                                        </ControlTemplate.Resources>
                                                                                        <Grid x:Name="Grid" Width="{TemplateBinding MinWidth}" Height="Auto" SnapsToDevicePixels="True" Background="Transparent">
                                                                                            <Rectangle x:Name="Base" Fill="{TemplateBinding Background}" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="1" RadiusX="3" RadiusY="3" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Height="Auto" SnapsToDevicePixels="True"/>
                                                                                            <Rectangle x:Name="RenderOverlay" RadiusX="3" RadiusY="3" HorizontalAlignment="Stretch" Margin="1" VerticalAlignment="Stretch" Height="Auto" SnapsToDevicePixels="True">
                                                                                                <Rectangle.Stroke>
                                                                                                    <LinearGradientBrush EndPoint="1.083,0.495" StartPoint="0.042,0.495">
                                                                                                        <GradientStop Color="#7FFFFFFF" Offset="0"/>
                                                                                                        <GradientStop Color="#19000000" Offset="1"/>
                                                                                                    </LinearGradientBrush>
                                                                                                </Rectangle.Stroke>
                                                                                                <Rectangle.Fill>
                                                                                                    <LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5">
                                                                                                        <GradientStop Color="#4CFFFFFF" Offset="0"/>
                                                                                                        <GradientStop Color="#0C000000" Offset="1"/>
                                                                                                    </LinearGradientBrush>
                                                                                                </Rectangle.Fill>
                                                                                            </Rectangle>
                                                                                            <Rectangle x:Name="Glow" Opacity="0" RadiusX="3" RadiusY="3" Margin="3">
                                                                                                <Rectangle.Fill>
                                                                                                    <SolidColorBrush Color="White"/>
                                                                                                </Rectangle.Fill>
                                                                                                    <!--Rectangle.BitmapEffect>
                                                                                                        <OuterGlowBitmapEffect GlowColor="White" GlowSize="8"/>
                                                                                                    </Rectangle.BitmapEffect-->
                                                                                            </Rectangle>
                                                                                        </Grid>
                                                                                        <ControlTemplate.Triggers>
                                                                                            <Trigger Property="IsFocused" Value="True"/>
                                                                                            <Trigger Property="IsDragging" Value="True">
                                                                                                <Trigger.EnterActions>
                                                                                                    <BeginStoryboard>
                                                                                                        <Storyboard>
                                                                                                            <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="Glow" Storyboard.TargetProperty="Opacity" To="1"/>
                                                                                                            <ThicknessAnimation Duration="00:00:00.1000000" Storyboard.TargetName="Glow" Storyboard.TargetProperty="Margin" To="-3"/>
                                                                                                        </Storyboard>
                                                                                                    </BeginStoryboard>
                                                                                                </Trigger.EnterActions>
                                                                                                <Trigger.ExitActions>
                                                                                                    <BeginStoryboard>
                                                                                                        <Storyboard>
                                                                                                            <DoubleAnimation Duration="00:00:00.1500000" Storyboard.TargetName="Glow" Storyboard.TargetProperty="Opacity" From="1" To="0"/>
                                                                                                            <ThicknessAnimation Duration="00:00:00.1500000" Storyboard.TargetName="Glow" Storyboard.TargetProperty="Margin" From="-3" To="-1"/>
                                                                                                        </Storyboard>
                                                                                                    </BeginStoryboard>
                                                                                                </Trigger.ExitActions>
                                                                                            </Trigger>
                                                                                            <Trigger Property="IsEnabled" Value="False">
                                                                                                <Setter Property="Fill" TargetName="RenderOverlay" Value="#1C000000"/>
                                                                                            </Trigger>
                                                                                        </ControlTemplate.Triggers>
                                                                                    </ControlTemplate>
                                                                                </Setter.Value>
                                                                            </Setter>
                                                                        </Style>
                                                                    </localp:UThumb.Style>
                                                                </localp:UThumb>
                                                            </localp:UTrack.Thumb>
                                                            <localp:UTrack.IncreaseRepeatButton>
                                                                <localp:URepeatButton Background="Transparent" SnapsToDevicePixels="True" Command="ScrollBar.LineDownCommand" x:Name="SliderIncrease">
                                                                    <localp:URepeatButton.Style>
                                                                        <Style TargetType="{x:Type localp:URepeatButton}">
                                                                            <Setter Property="Background" Value="{x:Null}"/>
                                                                            <Setter Property="BorderBrush" Value="{x:Null}"/>
                                                                            <Setter Property="IsTabStop" Value="False"/>
                                                                            <Setter Property="Focusable" Value="False"/>
                                                                            <Setter Property="Interval" Value="80"/>
                                                                            <Setter Property="Padding" Value="-5"/>
                                                                            <Setter Property="Template">
                                                                                <Setter.Value>
                                                                                    <ControlTemplate TargetType="{x:Type localp:URepeatButton}">
                                                                                        <Grid>
                                                                                            <Rectangle Fill="{TemplateBinding Background}" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="1" Margin="{TemplateBinding Padding}"/>
                                                                                        </Grid>
                                                                                    </ControlTemplate>
                                                                                </Setter.Value>
                                                                            </Setter>
                                                                        </Style>
                                                                    </localp:URepeatButton.Style>
                                                                </localp:URepeatButton>
                                                            </localp:UTrack.IncreaseRepeatButton>
                                                            <localp:UTrack.DecreaseRepeatButton>
                                                                <localp:URepeatButton Background="Transparent" SnapsToDevicePixels="True" Command="ScrollBar.LineUpCommand" x:Name="SliderDecrease">
                                                                    <localp:URepeatButton.Style>
                                                                        <Style TargetType="{x:Type localp:URepeatButton}">
                                                                            <Setter Property="Background" Value="{x:Null}"/>
                                                                            <Setter Property="BorderBrush" Value="{x:Null}"/>
                                                                            <Setter Property="IsTabStop" Value="False"/>
                                                                            <Setter Property="Focusable" Value="False"/>
                                                                            <Setter Property="Interval" Value="80"/>
                                                                            <Setter Property="Padding" Value="-5"/>
                                                                            <Setter Property="Template">
                                                                                <Setter.Value>
                                                                                    <ControlTemplate TargetType="{x:Type localp:URepeatButton}">
                                                                                        <Grid>
                                                                                            <Rectangle Fill="{TemplateBinding Background}" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="1" Margin="{TemplateBinding Padding}"/>
                                                                                        </Grid>
                                                                                    </ControlTemplate>
                                                                                </Setter.Value>
                                                                            </Setter>
                                                                        </Style>
                                                                    </localp:URepeatButton.Style>
                                                                </localp:URepeatButton>
                                                            </localp:UTrack.DecreaseRepeatButton>
                                                        </localp:UTrack>
                                                    </Border>
                                                </Grid>
                                                <ControlTemplate.Triggers>
                                                    <Trigger Property="IsAnyContactCapturedWithin" Value="True">
                                                        <Trigger.EnterActions>
                                                            <BeginStoryboard>
                                                                <Storyboard>
                                                                    <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="Width" To="30"/>
                                                                    <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="Thumb" Storyboard.TargetProperty="MinHeight" To="12"/>
                                                                    <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="Thumb" Storyboard.TargetProperty="MinWidth" To="30"/>
                                                                </Storyboard>
                                                            </BeginStoryboard>
                                                        </Trigger.EnterActions>
                                                        <Trigger.ExitActions>
                                                            <BeginStoryboard>
                                                                <Storyboard>
                                                                    <DoubleAnimation Duration="00:00:00.2000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="Width"/>
                                                                    <DoubleAnimation Duration="00:00:00.2000000" Storyboard.TargetName="Thumb" Storyboard.TargetProperty="MinHeight"/>
                                                                    <DoubleAnimation Duration="00:00:00.2000000" Storyboard.TargetName="Thumb" Storyboard.TargetProperty="MinWidth"/>
                                                                </Storyboard>
                                                            </BeginStoryboard>
                                                        </Trigger.ExitActions>
                                                    </Trigger>
                                                    <Trigger Property="IsEnabled" Value="False">
                                                        <Setter Property="Background" TargetName="Thumb" Value="#0CFFFFFF"/>
                                                        <Setter Property="Fill" TargetName="TrackBkgd" Value="#00000000"/>
                                                        <Setter Property="Opacity" TargetName="GridRoot" Value="0.5"/>
                                                        <Setter Property="IsEnabled" TargetName="PART_Track" Value="False"/>
                                                    </Trigger>
                                                </ControlTemplate.Triggers>
                                            </ControlTemplate>
                                        </Setter.Value>
                                    </Setter>
                                    <Style.Triggers>
                                        <Trigger Property="Orientation" Value="Horizontal">
                                            <Setter Property="Width" Value="NaN"/>
                                            <Setter Property="MinWidth" Value="30"/>
                                            <Setter Property="Height" Value="30"/>
                                            <Setter Property="MinHeight" Value="30"/>
                                            <Setter Property="Background">
                                                <Setter.Value>
                                                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                        <GradientStop Color="#33364E5C" Offset="0"/>
                                                        <GradientStop Color="#0C364E5C" Offset="1"/>
                                                    </LinearGradientBrush>
                                                </Setter.Value>
                                            </Setter>
                                            <Setter Property="VerticalAlignment" Value="Stretch"/>
                                            <Setter Property="HorizontalAlignment" Value="Stretch"/>
                                            <Setter Property="Template">
                                                <Setter.Value>
                                                    <ControlTemplate TargetType="{x:Type localp:UScrollBar}">
                                                        <ControlTemplate.Resources>
                                                            <Storyboard x:Key="Touch">
                                                                <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="Height" To="30"/>
                                                                <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="Thumb" Storyboard.TargetProperty="MinHeight" To="30"/>
                                                                <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="Thumb" Storyboard.TargetProperty="MinWidth" To="12"/>
                                                            </Storyboard>
                                                            <Storyboard x:Key="Release">
                                                                <DoubleAnimation Duration="00:00:00.2000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="Height"/>
                                                                <DoubleAnimation Duration="00:00:00.2000000" Storyboard.TargetName="Thumb" Storyboard.TargetProperty="MinHeight"/>
                                                                <DoubleAnimation Duration="00:00:00.2000000" Storyboard.TargetName="Thumb" Storyboard.TargetProperty="MinWidth"/>
                                                            </Storyboard>
                                                        </ControlTemplate.Resources>
                                                        <Grid x:Name="GridRoot" MinHeight="30" MinWidth="30" Height="Auto" SnapsToDevicePixels="True" Background="Transparent">
                                                            <Rectangle x:Name="TrackBkgd" Fill="{TemplateBinding Background}" Stroke="{TemplateBinding BorderBrush}" RadiusX="4" RadiusY="4" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Width="Auto" Height="8"/>
                                                            <Border x:Name="Track" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Opacity="1" SnapsToDevicePixels="True" Background="Transparent">
                                                                <localp:UTrack x:Name="PART_Track" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
                                                                    <localp:UTrack.Thumb>
                                                                        <localp:UThumb x:Name="Thumb" MinHeight="8" MinWidth="8" Background="White" SnapsToDevicePixels="True">
                                                                            <localp:UThumb.BorderBrush>
                                                                                <LinearGradientBrush EndPoint="1.007,0.495" StartPoint="-0.007,0.495">
                                                                                    <GradientStop Color="#66000000" Offset="0"/>
                                                                                    <GradientStop Color="#33000000" Offset="1"/>
                                                                                </LinearGradientBrush>
                                                                            </localp:UThumb.BorderBrush>
                                                                            <localp:UThumb.Style>
                                                                                <Style TargetType="{x:Type localp:UThumb}">
                                                                                    <Setter Property="Background">
                                                                                        <Setter.Value>
                                                                                            <LinearGradientBrush EndPoint="0.5,-0.012" StartPoint="0.5,1.002">
                                                                                                <GradientStop Color="#66000000" Offset="0"/>
                                                                                                <GradientStop Color="#33000000" Offset="1"/>
                                                                                            </LinearGradientBrush>
                                                                                        </Setter.Value>
                                                                                    </Setter>
                                                                                    <Setter Property="BorderBrush">
                                                                                        <Setter.Value>
                                                                                            <LinearGradientBrush EndPoint="1.083,0.495" StartPoint="0.042,0.495">
                                                                                                <GradientStop Color="#7FFFFFFF" Offset="0"/>
                                                                                                <GradientStop Color="#19000000" Offset="1"/>
                                                                                            </LinearGradientBrush>
                                                                                        </Setter.Value>
                                                                                    </Setter>
                                                                                    <Setter Property="Template">
                                                                                        <Setter.Value>
                                                                                            <ControlTemplate TargetType="{x:Type localp:UThumb}">
                                                                                                <ControlTemplate.Resources>
                                                                                                    <Storyboard x:Key="Press">
                                                                                                        <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="Glow" Storyboard.TargetProperty="Opacity" To="1"/>
                                                                                                        <ThicknessAnimation Duration="00:00:00.1000000" Storyboard.TargetName="Glow" Storyboard.TargetProperty="Margin" To="-3"/>
                                                                                                    </Storyboard>
                                                                                                    <Storyboard x:Key="Release">
                                                                                                        <DoubleAnimation Duration="00:00:00.1500000" Storyboard.TargetName="Glow" Storyboard.TargetProperty="Opacity" From="1" To="0"/>
                                                                                                        <ThicknessAnimation Duration="00:00:00.1500000" Storyboard.TargetName="Glow" Storyboard.TargetProperty="Margin" From="-3" To="-1"/>
                                                                                                    </Storyboard>
                                                                                                </ControlTemplate.Resources>
                                                                                                <Grid x:Name="Grid" Width="Auto" Height="{TemplateBinding MinHeight}" SnapsToDevicePixels="True" Background="Transparent">
                                                                                                    <Rectangle x:Name="Base" Fill="{TemplateBinding Background}" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="1" RadiusX="3" RadiusY="3" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Width="Auto" SnapsToDevicePixels="True"/>
                                                                                                    <Rectangle x:Name="RenderOverlay" RadiusX="3" RadiusY="3" HorizontalAlignment="Stretch" Margin="1" VerticalAlignment="Stretch" Width="Auto" SnapsToDevicePixels="True">
                                                                                                        <Rectangle.Stroke>
                                                                                                            <LinearGradientBrush EndPoint="0.563,1.015" StartPoint="0.563,-0.026">
                                                                                                                <GradientStop Color="#7FFFFFFF" Offset="0"/>
                                                                                                                <GradientStop Color="#19000000" Offset="1"/>
                                                                                                            </LinearGradientBrush>
                                                                                                        </Rectangle.Stroke>
                                                                                                        <Rectangle.Fill>
                                                                                                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                                                                                <GradientStop Color="#4CFFFFFF" Offset="0"/>
                                                                                                                <GradientStop Color="#0C000000" Offset="1"/>
                                                                                                            </LinearGradientBrush>
                                                                                                        </Rectangle.Fill>
                                                                                                    </Rectangle>
                                                                                                    <Rectangle x:Name="Glow" Opacity="0" RadiusX="3" RadiusY="3" Margin="3">
                                                                                                        <Rectangle.Fill>
                                                                                                            <SolidColorBrush Color="White"/>
                                                                                                        </Rectangle.Fill>
                                                                                                            <!--Rectangle.BitmapEffect>
                                                                                                                <OuterGlowBitmapEffect GlowColor="White" GlowSize="8"/>
                                                                                                        </Rectangle.BitmapEffect-->
                                                                                                    </Rectangle>
                                                                                                </Grid>
                                                                                                <ControlTemplate.Triggers>
                                                                                                    <Trigger Property="IsFocused" Value="True"/>
                                                                                                    <Trigger Property="IsDragging" Value="True">
                                                                                                        <Trigger.EnterActions>
                                                                                                            <BeginStoryboard>
                                                                                                                <Storyboard>
                                                                                                                    <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="Glow" Storyboard.TargetProperty="Opacity" To="1"/>
                                                                                                                    <ThicknessAnimation Duration="00:00:00.1000000" Storyboard.TargetName="Glow" Storyboard.TargetProperty="Margin" To="-3"/>
                                                                                                                </Storyboard>
                                                                                                            </BeginStoryboard>
                                                                                                        </Trigger.EnterActions>
                                                                                                        <Trigger.ExitActions>
                                                                                                            <BeginStoryboard>
                                                                                                                <Storyboard>
                                                                                                                    <DoubleAnimation Duration="00:00:00.1500000" Storyboard.TargetName="Glow" Storyboard.TargetProperty="Opacity" From="1" To="0"/>
                                                                                                                    <ThicknessAnimation Duration="00:00:00.1500000" Storyboard.TargetName="Glow" Storyboard.TargetProperty="Margin" From="-3" To="-1"/>
                                                                                                                </Storyboard>
                                                                                                            </BeginStoryboard>
                                                                                                        </Trigger.ExitActions>
                                                                                                    </Trigger>
                                                                                                    <Trigger Property="IsEnabled" Value="False">
                                                                                                        <Setter Property="Fill" TargetName="RenderOverlay" Value="#1C000000"/>
                                                                                                    </Trigger>
                                                                                                </ControlTemplate.Triggers>
                                                                                            </ControlTemplate>
                                                                                        </Setter.Value>
                                                                                    </Setter>
                                                                                </Style>
                                                                            </localp:UThumb.Style>
                                                                        </localp:UThumb>
                                                                    </localp:UTrack.Thumb>
                                                                    <localp:UTrack.IncreaseRepeatButton>
                                                                        <localp:URepeatButton Background="Transparent" SnapsToDevicePixels="True" Command="ScrollBar.LineRightCommand" x:Name="SliderIncrease">
                                                                            <localp:URepeatButton.Style>
                                                                                <Style TargetType="{x:Type localp:URepeatButton}">
                                                                                    <Setter Property="Background" Value="{x:Null}"/>
                                                                                    <Setter Property="BorderBrush" Value="{x:Null}"/>
                                                                                    <Setter Property="IsTabStop" Value="False"/>
                                                                                    <Setter Property="Focusable" Value="False"/>
                                                                                    <Setter Property="Interval" Value="80"/>
                                                                                    <Setter Property="Padding" Value="-5"/>
                                                                                    <Setter Property="Template">
                                                                                        <Setter.Value>
                                                                                            <ControlTemplate TargetType="{x:Type localp:URepeatButton}">
                                                                                                <Grid>
                                                                                                    <Rectangle Fill="{TemplateBinding Background}" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="1" Margin="{TemplateBinding Padding}"/>
                                                                                                </Grid>
                                                                                            </ControlTemplate>
                                                                                        </Setter.Value>
                                                                                    </Setter>
                                                                                </Style>
                                                                            </localp:URepeatButton.Style>
                                                                        </localp:URepeatButton>
                                                                    </localp:UTrack.IncreaseRepeatButton>
                                                                    <localp:UTrack.DecreaseRepeatButton>
                                                                        <localp:URepeatButton Background="Transparent" SnapsToDevicePixels="True" Command="ScrollBar.LineLeftCommand" x:Name="SliderDecrease">
                                                                            <localp:URepeatButton.Style>
                                                                                <Style TargetType="{x:Type localp:URepeatButton}">
                                                                                    <Setter Property="Background" Value="{x:Null}"/>
                                                                                    <Setter Property="BorderBrush" Value="{x:Null}"/>
                                                                                    <Setter Property="IsTabStop" Value="False"/>
                                                                                    <Setter Property="Focusable" Value="False"/>
                                                                                    <Setter Property="Interval" Value="80"/>
                                                                                    <Setter Property="Padding" Value="-5"/>
                                                                                    <Setter Property="Template">
                                                                                        <Setter.Value>
                                                                                            <ControlTemplate TargetType="{x:Type localp:URepeatButton}">
                                                                                                <Grid>
                                                                                                    <Rectangle Fill="{TemplateBinding Background}" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="1" Margin="{TemplateBinding Padding}"/>
                                                                                                </Grid>
                                                                                            </ControlTemplate>
                                                                                        </Setter.Value>
                                                                                    </Setter>
                                                                                </Style>
                                                                            </localp:URepeatButton.Style>
                                                                        </localp:URepeatButton>
                                                                    </localp:UTrack.DecreaseRepeatButton>
                                                                </localp:UTrack>
                                                            </Border>
                                                        </Grid>
                                                        <ControlTemplate.Triggers>
                                                            <Trigger Property="IsAnyContactCapturedWithin" Value="True">
                                                                <Trigger.EnterActions>
                                                                    <BeginStoryboard>
                                                                        <Storyboard>
                                                                            <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="Height" To="30"/>
                                                                            <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="Thumb" Storyboard.TargetProperty="MinHeight" To="30"/>
                                                                            <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="Thumb" Storyboard.TargetProperty="MinWidth" To="12"/>
                                                                        </Storyboard>
                                                                    </BeginStoryboard>
                                                                </Trigger.EnterActions>
                                                                <Trigger.ExitActions>
                                                                    <BeginStoryboard>
                                                                        <Storyboard>
                                                                            <DoubleAnimation Duration="00:00:00.2000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="Height"/>
                                                                            <DoubleAnimation Duration="00:00:00.2000000" Storyboard.TargetName="Thumb" Storyboard.TargetProperty="MinHeight"/>
                                                                            <DoubleAnimation Duration="00:00:00.2000000" Storyboard.TargetName="Thumb" Storyboard.TargetProperty="MinWidth"/>
                                                                        </Storyboard>
                                                                    </BeginStoryboard>
                                                                </Trigger.ExitActions>
                                                            </Trigger>
                                                            <Trigger Property="IsEnabled" Value="False">
                                                                <Setter Property="Background" TargetName="Thumb" Value="#0CFFFFFF"/>
                                                                <Setter Property="Fill" TargetName="TrackBkgd" Value="#00000000"/>
                                                                <Setter Property="Opacity" TargetName="GridRoot" Value="0.5"/>
                                                                <Setter Property="IsEnabled" TargetName="PART_Track" Value="False"/>
                                                            </Trigger>
                                                        </ControlTemplate.Triggers>
                                                    </ControlTemplate>
                                                </Setter.Value>
                                            </Setter>
                                        </Trigger>
                                    </Style.Triggers>
                                </Style>
                            </localp:UScrollBar.Style>
                        </localp:UScrollBar>
                    </local:UGrid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter Property="IsEnabled" TargetName="PART_HorizontalScrollBar" Value="False"/>
                            <Setter Property="IsEnabled" TargetName="PART_VerticalScrollBar" Value="False"/>
                        </Trigger>
                        <Trigger Property="Mode" Value="ScrollByBar">
                            <Setter Property="Grid.RowSpan" TargetName="PART_ElasticBorder" Value="1"/>
                            <Setter Property="Grid.ColumnSpan" TargetName="PART_ElasticBorder" Value="1"/>
                            <Setter Property="AutoHideScrollBar" Value="False"/>
                            <Setter Property="IsHitTestVisible" TargetName="PART_VerticalScrollBar" Value="True"/>
                            <Setter Property="IsHitTestVisible" TargetName="PART_HorizontalScrollBar" Value="True"/>
                        </Trigger>
                        <Trigger Property="AutoHideScrollBar" Value="False">
                            <Setter Property="ShowScrollBar" Value="True"/>
                        </Trigger>
                        <Trigger Property="ShowScrollBar" Value="True">
                            <Trigger.EnterActions>
                                <BeginStoryboard>
                                    <Storyboard>
                                        <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="PART_HorizontalScrollBar" Storyboard.TargetProperty="Opacity" To="1"/>
                                        <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="PART_VerticalScrollBar" Storyboard.TargetProperty="Opacity" To="1"/>
                                    </Storyboard>
                                </BeginStoryboard>
                            </Trigger.EnterActions>
                            <Trigger.ExitActions>
                                <BeginStoryboard>
                                    <Storyboard>
                                        <DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="PART_HorizontalScrollBar" Storyboard.TargetProperty="Opacity" To="0"/>
                                        <DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="PART_VerticalScrollBar" Storyboard.TargetProperty="Opacity" To="0"/>
                                    </Storyboard>
                                </BeginStoryboard>
                            </Trigger.ExitActions>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>